package com.workcell.workdata.xthings.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonAlias;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import java.time.LocalDateTime;

/**
 * 串口设备表
 *
 * @TableName t_base_serial_device
 */
@TableName(value = "t_base_serial_device")
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "BaseSerialDevice", description = "串口设备表")
public class BaseSerialDevice extends Model<BaseSerialDevice> {
    /**
     * 串口设备ID
     */
    @TableId
    @NotEmpty(message = "串口设备ID不能为空")
    @ApiModelProperty(value = "串口设备ID")
    private Integer id;

    /**
     * 设备名称
     */
    @ApiModelProperty(value = "设备名称")
    private String name;

    /**
     * 厂商名称
     */
    @ApiModelProperty(value = "厂商名称")
    private String manufacturer;

    /**
     * 产品类型
     */
    @ApiModelProperty(value = "产品类型")
    private String dcProductType;

    /**
     * 型号
     */
    @ApiModelProperty(value = "型号")
    private String dcModel;

    /**
     * 通讯方式
     */
    @ApiModelProperty(value = "通讯方式")
    private String dcCommunicationMode;

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态")
    private String state;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 厂商编码（厂商ID）
     */
    @JsonAlias("deviceManufacturer")
    @ApiModelProperty("厂商编码（厂商ID）")
    private String manufacturerCode;

	@TableField(exist = false)
	@ApiModelProperty(value="厂商编码（厂商ID）")
	private String deviceManufacturer;

    /**
     * 厂商简称
     */
    @ApiModelProperty("厂商简称")
    private String manufacturerShortName;

    /**
     * 厂商全称
     */
    @ApiModelProperty("厂商全称")
    private String manufacturerFullName;
}
